/**
Problem 3
02 November 2001

The prime factors of 13195 are 5, 7, 13 and 29.

What is the largest prime factor of the number 600851475143 ?

Answer: 6857
 */
package com.asharism.projectEuler.problem003;

import java.util.ArrayList;

/**
 * @author Hitec
 *
 */
public class Program {
	
	private static final long NUMBER = Long.parseLong("600851475143");

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
//		// Test for Primes.primeFactors
//		for(long factor : Primes.primeFactors(NUMBER))
//			System.out.println(factor);
		
		ArrayList<Long> primeFactors = Primes.primeFactors(NUMBER);
		
		System.out.println(primeFactors.get(primeFactors.size() - 1));
	}

}
